<template>
  <div demo-bg>
    <dv-scroll-board :config="config" style="width:25vw;height:36vh;" @mouseover="mouseoverHandler" @click="clickHandler"/>

  </div>
</template>

<script setup lang="ts">
import {reactive,onMounted} from 'vue'
import {getalarm}  from '../../request/index'
const config=reactive({
    header:['序号','楼号','设备状态'],
    data:null,
    index:true,
    columnWidth:[50],
    align:['center']
})

onMounted(()=>{
  getalarm().then(res=>{
    console.log('实时警报',res.data.data);
      let alldata=res.data.data 
      const enddata=alldata.map(obj=>Object.values(obj))
      config.data=enddata
  })
})

const mouseoverHandler=(e:any)=>{
    console.log(e);
}
const clickHandler=(e:any)=>{
    console.log(e);
    
}

</script>
<style scoped>

</style>